$(function(){
	$.ajax({

		   	   url:"json/lby.json",
		   	   async:true,
		   	   dataType:"json",
		   	   success:function(mag){
			   	   	var data = mag.data;
			   	   	var str ="";
			   	   	for(var i in data){
			   	   		str +="<dl class='dl_1'>"
			   	   		str +="<dt dataid='"+data[i].id+"'><img src='"+data[i].img+"'/></dt>"
			   	   		str +="<dd><a href='javascript:;'>"+data[i].name+"</a></dd>"
			   	   		str +="<p class='_p1'>" +data[i].price+"</p>"
			   	   		str +="<p class='_p2'>" +data[i].jf+"</p>"
			   	   		str +="<p class='_p3'><a href='#'>" +data[i].zhu+"</a></p>"
			   	   		str +="<div class='div1'>"
			   	   		for(var j in data[i].zs){
			   	   			
			   	   			str +="<div class='_p4'>"+data[i].zs[j].one+"</div>"
			   	   			
			   	   		}
			   	   		str +="</div>"
			   	   		str +="<p class='_p5'><img src='"+data[i].xing+"'/></p>"
			   	   		str +="</dl>"
			   	   	}
			   	   	$("#content .right .ridown ").append(str)
			   	   	
		   	    }       
		   	   	
    })
	var dataid = "";
	    $(".ridown").on("click","dl dt",function(){
	    	dataid =$(this).attr("dataid");
	    	setCookie("dataid",dataid)
	    	window.location.href = "xiangqingye.html"

	    })
	    $(".ridown").on("click","dl dd a",function(){
	    	dataid =$(this).parent().prev().attr("dataid");
	    	setCookie("dataid",dataid)
	    	window.location.href = "xiangqingye.html"
	    })
})